<div id="openingOrder">
    <input type="hidden" id="reservationsIdx" value="">
    <input type="hidden" id="moneyBalanceyw" value="">
    <input type="hidden" id="jfbalanceyw" value="">
    <input type="hidden" id="lowestPriceBill" value="">
    <input type="hidden" id="discountDiscount" value="">
    <div id="openingProject">
        <h3 style="display: flex">
            <span>收费项目列表</span>
            <span style="flex: 1;text-align: right;">
                <a href="javascript:;" id="normal_project" style="color: #FF7E00;font-weight: bold;">正常</a>
                <a href="javascript:;" id="free_admission" style="font-weight: bold;">免费</a>
            </span>
        </h3>
        <div id="openingBox">
            <div style="padding:10px 15px;">
                <select onchange="openFirstLevelProject()" name="firstLevelProjectDiv" id="firstLevelProjectDivsd"></select>
            </div>
            <div id="payServiceNamesd"></div>
        </div>
        <div id="openingBoxTwo" style="height: calc(100% - 40px);display: none;">
            <div style="height: 100%;padding: 0 15px;overflow: auto;" id="payServiceNameTwo"></div>
        </div>
    </div>
    <div id="projectList">
        <h3>
            <button class="btn" type="button"><span class="glyphicon glyphicon-chevron-left" style="top: -3px;"></span>
            </button>
            <input type="text" autocomplete="off" id="payServiceNames" placeholder="首字母/价格搜索" class="inputOne" oninput="payServiceSearch()">
            <select name="treatmentUnitTwo" id="treatmentUnitTwo" style="height: 26px;vertical-align: bottom;outline: none; ">
            </select>
            <ul id="dataUl" style="display: none"></ul>
        </h3>
        <div id="projectListBox">
            <div class="original">
                <div class="projectListTitle">
                    <div style="flex: 1">牙位</div>
                    <div style="flex: 2">项目名称</div>
                    <div>单价(元)</div>
                    <div style="flex: 0.5">单位</div>
                    <div>数量</div>
                    <div>折后金额</div>
                    <div>折扣(100%)</div>
                    <div style="display: none">实收金额</div>
                    <div style="display: none">参与组合折扣</div>
                    <div>医生</div>
                    <div style="flex: 0.5">操作</div>
                </div>
                <div id="projectListInfo" class="singleBox"></div>
                <div class="discountBox">
                    <div>
                        <div>
                            <span>整体折扣(%)</span>
                            <input onkeyup="num(this)" id="totalDiscount" readonly="readonly" value="100" type="text"/>
                        </div>
                    </div>
                    <div style="text-align: right">
                        <div>
                            <span>原价</span>
                            <input id="originalPrice" type="text" value="0" readonly="readonly"/>
                        </div>
                        <div>
                            <span style="color: #FF7E00">折后金额</span>
                            <input id="totalSum1" type="text" value="0" readonly="readonly"/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="integralBox">
                <label for="earnest"><input type="checkbox" name="discount" id="earnest" value="储值划扣"><span>储值余额<span id="moneyBalance" style="margin-left: 10px;">
                   </span></span></label>
                <label for="integral"><input type="checkbox" name="discount" id="integral" value="使用返现"><span>使用返现/优惠券可抵扣金额<span id="jfbalance" style="margin-left: 10px;">
                    </span></span></label>
                <label for="membershipOther"><input type="checkbox" name="membership" id="membershipOther" value="使用其他会员折扣"><span>使用其他会员折扣</span></label>
            </div>
            <div class="original projectBox" style="display: block">
                <div style="box-shadow: none;">
                    <div class="projectListTitle">
                        <div style="flex: 2">项目名称</div>
                        <div style="flex: 0.5">单价</div>
                        <div style="flex: 0.5">数量</div>
                        <div style="flex: 0.5">应收</div>
                        <div style="flex: 0.5">实收</div>
                        <div class="earnest">划扣储值</div>
                        <div class="integral">抵用方式</div>
                        <div class="integral">抵用金额</div>
                    </div>
                    <div id="discountBox" class="singleBox"></div>
                </div>
                <div class="discountBox discountBoxHide" style="display: none;box-shadow: none;">
                    <div style="text-align: right">
                        <div>
                            <span style="color: #FF7E00">本次应收</span>
                            <input readonly="readonly" id="realTotalSum2" type="text" value=""/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="chargeBox">
                <div>
                    <span>应收：</span>
                    <input type="text" readonly="readonly" id="newTotalSum" value="0">
                </div>
                <div>
                    <span>缴费：</span>
                    <input type="text" autocomplete="off" oninput="decimalNum(this),oninputPayAmount()"
                           id="newPayAmount" style="background: white;color: #ff7e00;" value="0">
                </div>
                <div>
                    <span>欠费：</span>
                    <input type="text" readonly="readonly" style="color: red;" value="0" id="newArrears">
                </div>
            </div>
            <div class="personnelBox">
                <div style="margin-bottom: 10px;">
                    <span>医生*：</span>
                    <select onchange="chooseDoctor()" id="projectDoctor">
                    </select>
                </div>
                <div style="margin-bottom: 10px;">
                    <span>护士*：</span>
                    <select id="projectNurse">
                    </select>
                </div>
                <div>
                    <span style="vertical-align: top;">备注 ：</span>
                    <textarea name="proRemark" id="proRemark"></textarea>
                </div>
            </div>
            <div class="submissionBox">
                <div class="btnBox" style="text-align: left;">
                    <button onclick="IsDealInfoDlg.openBillNew()" type="button" class="btn">确认</button>
                    <button onclick="parent.layer.close(parent.layer.getFrameIndex(window.name))" type="button" class="btn">取消</button>
                </div>
            </div>
        </div>
    </div>
    <div id="distributionTips" style="display: none">
        <div class="distribution-title" style="display: flex;height: 50px;line-height: 50px;padding: 0 40px;color: black;font-weight: 700;">
            <div style="flex: 1;">应收：<span id="distribution-receivable">0.00</span></div>
            <div style="flex: 1;">缴费：<span id="distribution-pay" style="color: #ff7e00;">0.00</span></div>
            <div style="flex: 1;color: red;">欠费：<span id="distribution-arrears">0.00</span></div>
        </div>
        <div class="distribution-content" style="height: calc(100% - 100px);padding: 10px 40px">
            <div class="distribution-content-title" style="display:flex;color: black;font-weight: 700;">
                <div style="flex: 2;">项目</div>
                <div style="flex: 1;">医生</div>
                <div style="flex: 1;">应收</div>
                <div style="flex: 1;text-align: center;">缴费分配</div>
            </div>
            <div id="distribution-content-box" style="color: black;font-weight: 700;padding-top: 5px;height: calc(100% - 21px);overflow: auto;"></div>
        </div>
        <div class="distribution-btn" style="text-align: center;height: 50px;line-height: 50px;">
            <button type="button" class="btn btn-default" onclick="distributionSubmit(this)" style="padding: 4px 14px;background: #ff7e00;color: white;font-weight: 700;">确认</button>
            <button type="button" class="btn btn-default" onclick="layer.close(layer.index)" style="padding: 4px 14px;font-weight: 700;">取消</button>
        </div>
    </div>
</div>
@layout("/common/_noneBox.html"){
@}
<script src="${ctxPath}/static/modular/tcCenter/consultant/open_bill1.js?v=20200628"></script>